<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<html>
<head>
<title>合格证补录</title>
	<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
	<script src="${contextPath}/scripts/scriptvalidator.js" type="text/javascript"></script>
	<script src="${contextPath}/scripts/common.js" type="text/javascript"></script>
	<link href="${contextPath}/styles/default.css" rel="stylesheet" type="text/css" />
	<script src="${contextPath}/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
<div class="navigation">
	    <span><a href="javascript:window.history.back();"><img src="${contextPath}/images/back_nav_btn.png" /></a>
	    <a href="javascript:window.history.back();">返回</a>
	    <a href="javascript:window.history.forward();"><img src="${contextPath}/images/go_nav_btn.png" /></a>
	     <a href="javascript:window.history.forward();">前进</a>
	    <a href="javascript:window.location.reload();"><img src="${contextPath}/images/refresh_nav_btn.png" /></a>
	     <a href="javascript:window.location.reload();">刷新</a>
	    </span>合格证管理&gt;&gt;合格证批量补录审核
    </div>
<div class="xt_main_right_center">
<form name="searchForm" id="searchForm" method="post" action="">
<input type="hidden" name="redirectUrl" value='<s:property value='redirectUrl'/>'/>
<table width="100%" border="0">
  <tr>
    <td class="left-td-width-bg">申请人：</td>
    <td class="right-td-width-bg-left">${user.realName }</td>
    <td class="left-td-width-bg">申请时间：</td>
    <td class="right-td-width-bg-left"><s:date name="applyDate" format="yyyy-MM-dd"/></td>
  </tr>
  <tr>
  	<td class="left-td-width-bg">选择经销店：</td>
    <td class="right-td-width-bg-left" colspan="3">
      	${shop.shopName }
    </td>
  </tr>
  <tr>
    <td colspan="4" align="center"><label>
    </label></td>
    </tr>
</table>
<div id="addList">
 
  <table width="100%" border="0" cellpadding="0">
    <tr>
      <td colspan="8" align="right">&nbsp;</td>
      </tr>
    <tr>
      <td class="top-td-width-bg"><label>
        <input type="checkbox" name="checkbox" id="checkbox" />
      </label>
        全选/全不选</td>
      <td class="top-td-width-bg">序号</td>
      <td class="top-td-width-bg">销售店</td>
      <td class="top-td-width-bg">金融机构</td>
      <td class="top-td-width-bg">渠道</td>
      <td class="top-td-width-bg">合格证号</td>
      <td class="top-td-width-bg">车架号</td>
    </tr>
     <s:iterator value="applyCer.applyCerLists" status="st" id="u">
    <tr>
      <td class="down-center-td-width-bg"><input type="checkbox" name="applyIds" id="checkbox2" value="${u.id }"/></td>
      <td class="down-center-td-width-bg"><s:property value="#st.index+1"/></td>
      <td class="down-center-td-width-bg">${u.shop.shopName }</td>
      <td class="down-center-td-width-bg">${u.financial.name}</td>
      <td class="down-center-td-width-bg">${u.brand.name}</td>
      <td class="down-center-td-width-bg">${u.certificationNum}</td>
      <td class="down-center-td-width-bg">${u.chassis}</td>
    </tr>
    </s:iterator>
  </table>
</div>
<table width="100%" border="0" cellpadding="0">
  <tr>
    <td class="top-td-width-bg">审核意见</td>
    <td colspan="2"><label>
      <textarea name="textfield" cols="50" rows="5" id="textfield"></textarea>
    </label></td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td align="center" valign="middle">
             <input class="btn_pass" id="pass" value="" type="button" onclick="auditing('${applyCer.id }','true')"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          	<input class="btn_refuse" id="refuse" value="" type="button" onclick="auditing('${applyCer.id }','false')"/>
    </td>
  </tr>
</table>
<p>&nbsp;</p>
</form>
</div>
<br/><br/><br/><br/><br/>
		<div><jsp:include page="/include/footer.inc"></jsp:include></div>
		
<script type="text/javascript">
$("#checkbox").change(function(){
    
    var bool = $(this).is(":checked");
    
    $("[name='applyIds']").each(function(){
        
        if(bool){
            
            $(this).attr("checked", "checked");
           
        }else{
            
            $(this).removeAttr("checked");
        }
        
        $(this).change();
    });
});
function auditing(id,mark){
	 var searchForm = document.searchForm;
		searchForm.action = "auditingApply.do?currentPage=${currentPage}&id="+id+"&mark="+mark;
		searchForm.submit();
}
</script>
</body>
</html>